package models

import (
	"site/config"

	"gorm.io/driver/mysql"
	"gorm.io/gorm"
)

var DB *gorm.DB

func ConnectDB() error {
	var err error
	DB, err = gorm.Open(mysql.Open(config.Common.DSN), &gorm.Config{})

	return err
}
